<template>
	<view class="flex align-center border-bottom p-2" hover-class="bg-light">
		<image :src="item.avatar" mode="" class="rounded-circle" style="width: 80rpx;height: 80rpx;"></image>
		<view class="flex flex-column flex-1 pl-2">
			<view class="flex align-center justify-between">
				<text>{{item.username}}</text>
				<text class="font text-secondary">{{item.update_time | formatTime}}</text>
			</view>
			<view class="flex align-center justify-between mt-1">
				<text class="font text-secondary text-ellipsis" style="max-width: 500rpx;">{{item.data}}</text>
				<uni-badge text="1" type="error"></uni-badge>
			</view>
		</view>
	</view>
</template>

<script>
	// 引入时间库
	import $T from '@/common/time.js'
	import uniBadge from '@/uni-ui/uni-badge/uni-badge.vue'
	export default {
		props: {
			item: Object,
			index: Number
		},
		components: {
			uniBadge
		},
		filters: {
			formatTime(value) {
				return $T.gettime(value);
			}
		}
	}
</script>

<style>
</style>
